#include "gtest/gtest.h"
#include <sstream>
#include "logger.hpp"

using namespace rsv;

TEST(singletonTest, test) 
{
	std::ostringstream oss1, oss2;
    oss1 << &Logger::instance();
    oss2 << &Logger::instance();

    EXPECT_EQ(oss1.str(), oss2.str());
    EXPECT_EQ(oss1.str(), "0x7f94160008c0");
    
    Logger::instance().~Logger();
    oss1.str("");
    oss2.str("");
    oss1 << &Logger::instance();
    oss2 << &Logger::instance();

    EXPECT_EQ(oss1.str(), oss2.str());
    EXPECT_EQ(oss2.str(), "0x7f94160008c0");

}